package com.tarena.luban.worker.server;

import cn.tedu.luban.test.dao.DaoTest;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ImportResource;

/**
 * @author java@tedu.cn
 * @version 1.0
 */
@SpringBootApplication
@MapperScan("com.tarena.luban.worker.server.dao")
@ImportResource("classpath:applicationContext.xml")
public class WorkerServerApplication {
    //检测以下是否能够创建myabtis的实现对象DaoTest
    public static void main(String[] args) {
        //从启动方法获取返回值,spring上下文对象
        ConfigurableApplicationContext
        context = SpringApplication
                .run(WorkerServerApplication.class, args);
//        DaoTest proxy = context.getBean(DaoTest.class);
//        System.out.println(proxy.getClass().getName());
//        int select = proxy.select();
//        System.out.println(select);
    }
}
